package cn.mjnxin.iot.base.domain;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;

/**
 * 报文实体
 * 
 * @author CLG 2023年10月10日
 * @version V1.0.0
 */
public class SocketData {

	private ByteBuf byteBuf;

	private int pid;

	private Integer count;

	public SocketData(ByteBuf byteBuf) {
		super();
		this.byteBuf = byteBuf;
	}

	public SocketData(byte[] content) {
//		byteBuf = CommonUtil.getByteBuf(content.length);
//		byteBuf.writeBytes(content);
		byteBuf = Unpooled.wrappedBuffer(content);
	}

	public ByteBuf getByteBuf() {
		return byteBuf;
	}

	public void setByteBuf(ByteBuf byteBuf) {
		this.byteBuf = byteBuf;
	}

	public int getPid() {
		return pid;
	}

	public void setPid(int pid) {
		this.pid = pid;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}
}
